<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="UTF-8">
    <!-- 导入css -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
    <title>猫咪用品</title>
    <style>
        body {
            background-color: rgba(255, 170, 0, 0.27);
            margin: 0;
            padding: 0;
        }

        .el-header, .el-footer {
            margin: 0;
            padding: 0;
        }

        .el-header > div > div > a {
            text-decoration: none;
            color: #815343;
        }

        .el-menu.el-menu--horizontal {
            border: none;
        }
    </style>
</head>
<body>
<div id="app">
    <el-container>
        <el-header height="150px">
            <div style="background-color: white">
                <div style="width: 1200px;margin: 0 auto;">
                    <img src="imgs/logo.jpg" alt="" height="75px" width="150px" style="vertical-align: middle">
                    <a href="">首页</a>
                    <el-divider direction="vertical"></el-divider>
                    <a href="">养猫守则</a>
                    <el-divider direction="vertical"></el-divider>
                    <a href="">个人中心</a>
                    <el-divider direction="vertical"></el-divider>
                    <a href="">购物车</a>
                    <el-divider direction="vertical"></el-divider>
                    <a href="">帮助</a>
                </div>
            </div>
            <div style="background-color: #815343">
                <el-menu style="width: 1200px;margin: 0 auto;" mode="horizontal" background-color="#815343"
                         text-color="#fff" active-text-color="pink "
                         @select="mainSelect">
                    <el-menu-item index="1">推荐产品</el-menu-item>
                    <el-menu-item index="2">粮食专区</el-menu-item>
                    <el-menu-item index="3">医疗保健</el-menu-item>
                    <el-menu-item index="4">生活品质</el-menu-item>
                    <el-menu-item index="5">清洁卫生</el-menu-item>
                    <div style="float: right;position: relative;top: 10px">
                        <el-input type="text" placeholder="请输入搜索内容" v-model="search">
                            <el-button slot="append" icon="el-icon-search"></el-button>
                        </el-input>
                    </div>
                </el-menu>
            </div>
        </el-header>

        <!--主体-->
        <el-main style="margin: 0 auto;width: 1200px;">
            <el-row gutter="20">
                <el-col span="12">
                    <el-card>
                        <img src="imgs/k1.png" width="530px" height="600px">
                    </el-card>
                </el-col>
                <el-col span="12">
                    <h1 style="color:#000000;">法国皇家Royal Canin 孕猫及12个月以下幼猫粮 2kg K36</h1>
                    <el-divider></el-divider>
                    <p style="color:rgba(97,94,94,0.8);">销量234 浏览量4356</p>
                    <b style="font-size: 20px">￥342</b> <span style="color:rgba(97,94,94,0.8);">原价</span> <s
                        style="color:rgba(97,94,94,0.8);">998</s>
                    <br>
                    <el-divider></el-divider>
                    <div>
                        <span>配送至:</span>
                        <el-cascader :options="options" clearable></el-cascader>
                    </div>
                    <br>
                    <el-divider></el-divider>
                    <div>
                        <template>
                            <el-input-number v-model="num" @change="handleChange" :min="1" :max="100" label="采购数量"></el-input-number>
                        </template>
                        <el-button type="danger">加入购物车</el-button>
                    </div>
                </el-col>
            </el-row>
            <el-row>
                <div style="width: 100%;text-align: center;background-color: #d46666;border-radius: 10px;margin-top: 50px">
                    <b style="font-size: 50px">产品详情</b>
                </div>
                <el-card v-for="name in pArr" style="width: 100%;text-align: center;">
                    <img :src="name" alt="">
                </el-card>

            </el-row>


        </el-main>


        <!--底部-->
        <el-footer>
            <div style="background-color: #282c30; color:#666;text-align: center;padding: 50px 0;width: 100%;">
                <p>Copyright © 北京达内金桥科技有限公司版权所有 京ICP备12003709号-3 京公网安备 11010802029572号</p>
                <p>达内在线WWW.TMOOC.CN 专注于IT职业技能培训</p>
                <p>涵盖20余门课程体系，致力于打造权威的IT职业教育学习平台</p>
            </div>
        </el-footer>
    </el-container>
</div>
</body>

<!-- 在element组件前导入vue -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- 导入js -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: function () {
            return {
                /*确认显示商品*/
                currentIndex: "1",
                /*与搜索框绑定*/
                search: "",
                //购物车数量
                num: 1,
                //地址
                options: [{
                    value: 'hubei',
                    label: '湖北',
                    children: [{
                        value: 'wuhanshi',
                        label: '武汉',
                        children: [{
                            value: 'hongshanqu',
                            label: '洪山区'
                        }, {
                            value: 'qingshanqu',
                            label: '青山区'
                        }, {
                            value: 'wuchangqu',
                            label: '武昌区'
                        }]
                    }, {
                        value: 'xianningshi',
                        label: '咸宁市',
                        children: [{
                            value: 'chibishi',
                            label: '赤壁市'
                        }, {
                            value: 'shenshan',
                            label: '神山'
                        }]
                    }]
                }],
                /*产品图片*/
                pArr:["imgs/i1.png","imgs/i2.png","imgs/i3.png","imgs/i4.png"
                    ,"imgs/i5.png","imgs/i6.png","imgs/i7.png","imgs/i8.png"
                    ,"imgs/i9.png","imgs/i10.png","imgs/i11.png","imgs/i12.png"
                    ,"imgs/i13.png","imgs/i14.png"]
            }
        },
        methods: {
            //购物车
            handleChange(value) {
                console.log(value);
            },
            /*显示专区*/
            mainSelect(key) {
                switch (key) {
                    case "1":
                        location.href = "CatProductsDisplay.html";
                        break;
                    case "2":
                        location.href = "CatFood.html";
                        break;
                    case "3":
                        location.href = "CatHealth.html";
                        break;
                    case "4":
                        location.href = "CatLive.html";
                        break;
                    case "5":
                        location.href = "CatHygiene.html";
                        break;
                }
            }
        }
    })
</script>
</html>